Ruby Gem command and rubygem command
I. Introduction
Gem is a standard package for managing Ruby libraries and programs. It is very convenient to find, install, upgrade, and uninstall software packages through Ruby Gem (such as http://rubygems.org/)
Transferred from: http://www.jianshu.com/p/728184da1699Gem Introduction:Gem is a standard package for managing Ruby libraries and programs, and it is easy to find, install, upgrade, and uninstall packages through Ruby Gems such as
GEM-related commands use
1. Show help and version of Gem
Copy Code code as follows:
Gem–h/--help
#显示gem的帮助
Gem–v/--version#显示gem的版本号
2. List all available software for the remote library
Copy Code code as follows:
Ruby-v # view the ruby VERSION ruby-e '''require "watir"; puts Watir: IE: version'' # view the watir VERSION
Rvm list known # list known ruby versions
Rvm install 1.9.3
Rvm use 1.9.3 | rvm use system
Rvm use 1.9.3 -- default
Rvm list # list local
Gem Common commands
Gem-v # View version of RubyGems software
gem help #显示RubyGem使用帮助
Gems help Example #列出RubyGem命令一些使用范例
gem install [gemname] # ann Install the specified gem package, the program will first find the GEM package from this
NPM Install installation Nodejs Dependency PackFor example, NPM install Express installs the latest version of Express by default, or you can install the specified version by adding the version number later, such as NPM install [email protected]NPM
1. Background
When rails 3.0 was released, many of them worried about installing the gem, which was too slow to download the gem. This is not a slow network speed. Ruby's net: HTTP must pass through the wall and go through the sea to reach the
The specific process is as follows:
1. After the InstantRails-2.0 is installed, configure the ruby/bin directory in the environment variable path (if there are multiple Ruby in the system, the system recognizes the path when executing the command
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.